package edu.usx.server.pojo;

import io.swagger.annotations.ApiModelProperty;

import java.util.List;

public class PageDTO<T> {
    @ApiModelProperty(value = "数据列表")
    private List<T> Results;
    @ApiModelProperty(value = "是否还有更多数据")
    private boolean hasMore;
    @ApiModelProperty(value = "分页信息")
    private PageInfo page;
    @Override
    public String toString() {
        return "PageDTO{" +
                "results=" + Results +
                ", hasMore=" + hasMore +
                ", page=" + page +
                '}';
    }

    public PageDTO(){}
    public PageDTO(List<T> Results, boolean hasMore, PageInfo page) {
        this.Results = Results;
        this.hasMore = hasMore;
        this.page = page;
    }


    public List<T> getResults() {
        return Results;
    }

    public void setResults(List<T> sites) {
        this.Results = sites;
    }

    public boolean isHasMore() {
        return hasMore;
    }

    public void setHasMore(boolean hasMore) {
        this.hasMore = hasMore;
    }

    public PageInfo getPage() {
        return page;
    }

    public void setPage(PageInfo pageInfo) {
        this.page = pageInfo;
    }
}
